import  { createApp } from 'vue'

import './style.css'
import App from './App.vue'
import router from './router/index'
import i18nService from "./utils/i18nservice"

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import setupStore from './store/index'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 注册指令
import installPlugins  from './plugins'
installPlugins(app)
setupStore(app)

app.use(router)
app.use(ElementPlus)
// 使用国际化插件
app.use(i18nService.getI18nInstance());
app.mount('#app')